home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Includes1.3 / include.h / devices / prtgfx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-15  |  2.9 KB  |  73 lines

  1. #ifndef DEVICES_PRTGFX_H
  2. #define DEVICES_PRTGFX_H
  3. /*
  4. **    $Filename: devices/prtgfx.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    
  8. **
  9. **    (C) Copyright 1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #define PCMYELLOW    0        /* byte index for yellow */
  14. #define PCMMAGENTA    1        /* byte index for magenta */
  15. #define PCMCYAN        2        /* byte index for cyan */
  16. #define PCMBLACK    3        /* byte index for black */
  17. #define PCMBLUE        PCMYELLOW    /* byte index for blue */
  18. #define PCMGREEN    PCMMAGENTA    /* byte index for green */
  19. #define PCMRED        PCMCYAN        /* byte index for red */
  20. #define PCMWHITE    PCMBLACK    /* byte index for white */
  21.  
  22. union colorEntry {
  23.     ULONG colorLong;    /* quick access to all of YMCB */
  24.     UBYTE colorByte[4];    /* 1 entry for each of YMCB */
  25.     BYTE colorSByte[4];    /* ditto (except signed) */
  26. };
  27.  
  28. struct PrtInfo { /* printer info */
  29.     int (*pi_render)();        /* ptr to render function */
  30.     struct RastPort *pi_rp;        /* source rastport */
  31.     struct RastPort *pi_temprp;    /* temp 1-line high rastport */
  32.     UWORD *pi_RowBuf;        /* array of color codes */
  33.     UWORD *pi_HamBuf;        /* array of HAM color codes */
  34.     union colorEntry *pi_ColorMap;    /* rastport colormap in YMCB values */
  35.     union colorEntry *pi_ColorInt;    /* color intensities for entire row */
  36.     union colorEntry *pi_HamInt;    /* HAM color ints for entire row */
  37.     union colorEntry *pi_Dest1Int;    /* color intensities for dest1 row */
  38.     union colorEntry *pi_Dest2Int;    /* color intensities for dest2 row */
  39.     UWORD *pi_ScaleX;        /* array of scale values for x */
  40.     UWORD *pi_ScaleXAlt;        /* alt array of scale values for x */
  41.     UBYTE *pi_dmatrix;        /* ptr to dither matrix */
  42.     UWORD *pi_TopBuf;        /* color codes for line above us */
  43.     UWORD *pi_BotBuf;        /* color codes for line below us */
  44.  
  45.     UWORD pi_RowBufSize;        /* size of RowBuf array */
  46.     UWORD pi_HamBufSize;        /* size of HamBuf array */
  47.     UWORD pi_ColorMapSize;        /* size of ColorMap array */
  48.     UWORD pi_ColorIntSize;        /* size of Color Intensities array */
  49.     UWORD pi_HamIntSize;        /* size of Ham Intensities array */
  50.     UWORD pi_Dest1IntSize;        /* size of Dest1Int array */
  51.     UWORD pi_Dest2IntSize;        /* size of Dest2Int array */
  52.     UWORD pi_ScaleXSize;        /* size of ScaleX array */
  53.     UWORD pi_ScaleXAltSize;        /* size of ScaleXAlt array */
  54.  
  55.     UWORD pi_PrefsFlags;        /* copy of Preferences 'PrintFlags' */
  56.     ULONG pi_special;        /* copy of io_Special bits */
  57.     UWORD pi_xstart;        /* source x origin to print from */
  58.     UWORD pi_ystart;        /* source y origin to print from */
  59.     UWORD pi_width;            /* source width */
  60.     UWORD pi_height;        /* source height */
  61.     ULONG pi_pc;            /* dest width (Print Cols) */
  62.     ULONG pi_pr;            /* dest height (Print Rows) */
  63.     UWORD pi_ymult;            /* y multiple (used for y scaling) */
  64.     UWORD pi_ymod;            /* y modulas (used for y scaling) */
  65.     WORD pi_ety;            /* y error term (for y scaling) */
  66.     UWORD pi_xpos;            /* left offset print position */
  67.     UWORD pi_threshold;        /* threshold value (from prefs) */
  68.     UWORD pi_tempwidth;        /* temp var for width */
  69.     UWORD pi_flags;            /* internal flags */
  70. };
  71.  
  72. #endif    /* DEVICES_PRTGFX_H */
  73.